﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tools.Model;

namespace Tools.Model
{
    public class EntityBase : IObjectWithState
    {
        //public int Id { get; set; }

        [NotMapped]
        public State EntityState { get; set; }

        public Dictionary<string, object> OriginalValues { get; set; }

        public static string GetTableName(Type opType)
        {
            return opType.GetAttribute<TableAttribute>().Name;
        }
    }
}
